# -*- coding: utf-8 -*-
"""
 @Time    : 2021/1/27 下午2:51
 @Author  : tgy
 
"""
# import package01.utils

"""
下面的导入步骤如下:

from package01.utils
test01 = package01.utils.test01
del package01.utils

"""
from package01.utils import test01

# from package01 import *
print(locals())


def test02():
    globals()['opt'] = 101
    x = 12
    print(locals())
    locals()['x'] = 112
    print(x)


test02()

print(opt)

if __name__ == '__main__':
    ...
    # package01.utils.test01()
    # utils.test01()
    test01()
    # print(opt)
    # print(_y)
    import sys
    # for k,v in sys.modules.items():
    #     print('{:30} <==> {}'.format(k,v))
    # print(package01)
    xxx = 10
    # del xxx
    # print(xxx)
    print(locals())
    print(sys.modules['package01'].x)